Computing with Hereditarily Finite Sequences

نویسنده

  • Paul Tarau
چکیده

We use Prolog as a flexible meta-language to provide executable specifications of some fundamental mathematical objects and their transformations. In the process, isomorphisms are unraveled between natural numbers and combinatorial objects (rooted ordered trees representing hereditarily finite sequences and rooted ordered binary trees representing Gödel’s System T types). This paper focuses on an application that can be seen as an unexpected “paradigm shift”: we provide recursive definitions showing that the resulting representations are directly usable to perform symbolically arbitrary-length integer computations. Besides the theoretically interesting fact of “breaking the arithmetic/symbolic barrier”, the arithmetic operations performed with symbolic objects like trees or types turn out to be genuinely efficient – we derive implementations with asymptotic performance comparable to ordinary bitstring implementations of arbitrary-length integer arithmetic. The source code of the paper, organized as a literate Prolog program, is available at http://logic.cse.unt.edu/tarau/research/2011/pPAR.pl

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ranking Catamorphisms and Unranking Anamorphisms on Hereditarily Finite Datatypes

Using specializations of unfold and fold on a generic tree data type we derive unranking and ranking functions providing natural number encodings for various Hereditarily Finite datatypes. In this context, we interpret unranking operations as instances of a generic anamorphism and ranking operations as instances of the corresponding catamorphism. Starting with Ackerman’s Encoding from Hereditar...

متن کامل

A Groupoid of Isomorphic Data Transformations

As a variation on the known theme of Gödel numberings, isomorphisms defining data type transformations in a strongly typed functional language are organized as a finite groupoid using a higher order combinator language that unifies popular data types as diverse as natural numbers, finite sequences, digraphs, hypergraphs and finite permutations with more exotic ones like hereditarily finite func...

متن کامل

Encodings of Sets and Hypersets

We will present some results and open problems on an extension of the Ackermann encoding of Hereditarily Finite Sets into Natural Numbers. In particular, we will introduce and discuss a simple modification of the above mentioned Ackermann encoding, that should naturally generalize from Hereditarily Finite Sets to Hereditarily Finite Hypersets.

متن کامل

Ranking and Unranking of Hereditarily Finite Functions and Permutations

Prolog’s ability to return multiple answers on backtracking provides an elegant mechanism to derive reversible encodings of combinatorial objects as Natural Numbers i.e. ranking and unranking functions. Starting from a generalization of Ackerman’s encoding of Hereditarily Finite Sets with Urelements and a novel tupling/untupling operation, we derive encodings for Finite Functions and use them a...

متن کامل

ar X iv : m at h / 04 02 23 6 v 2 [ m at h . G N ] 4 A ug 2 00 4 Hereditarily h - complete groups ∗

A topological group G is h-complete if every continuous homomorphic image of G is (Ra˘ ıkov-)complete; we say that G is hereditarily h-complete if every closed subgroup of G is h-complete. In this paper, we establish open-map properties of hereditarily h-complete groups with respect to large classes of groups, and prove a theorem on the (total) minimality of sub-directly represented groups. Num...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1112.3782  شماره 

صفحات  -

تاریخ انتشار 2011